package com.csun.cmny.provider.pojo;

import java.io.Serializable;

public class CacOldmanMinorKey implements Serializable {
    private Integer oldmanId;

    private Integer minorItemId;

    private Integer cacId;

    private Long groupId;

    private static final long serialVersionUID = 1L;

    public Long getGroupId() {
        return groupId;
    }

    public void setGroupId(Long groupId) {
        this.groupId = groupId;
    }

    public Integer getOldmanId() {
        return oldmanId;
    }

    public void setOldmanId(Integer oldmanId) {
        this.oldmanId = oldmanId;
    }

    public Integer getMinorItemId() {
        return minorItemId;
    }

    public void setMinorItemId(Integer minorItemId) {
        this.minorItemId = minorItemId;
    }

    public Integer getCacId() {
        return cacId;
    }

    public void setCacId(Integer cacId) {
        this.cacId = cacId;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        CacOldmanMinorKey other = (CacOldmanMinorKey) that;
        return (this.getOldmanId() == null ? other.getOldmanId() == null : this.getOldmanId().equals(other.getOldmanId()))
                && (this.getCacId() == null ? other.getCacId() == null : this.getCacId().equals(other.getCacId()))
                && (this.getMinorItemId() == null ? other.getMinorItemId() == null : this.getMinorItemId().equals(other.getMinorItemId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getOldmanId() == null) ? 0 : getOldmanId().hashCode());
        result = prime * result + ((getMinorItemId() == null) ? 0 : getMinorItemId().hashCode());
        result = prime * result + ((getCacId() == null) ? 0 : getCacId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", oldmanId=").append(oldmanId);
        sb.append(", minorItemId=").append(minorItemId);
        sb.append(", cacId=").append(cacId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}